<%--
  Created by IntelliJ IDEA.
  User: 顾竣尹
  Date: 2024/12/16
  Time: 下午6:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        table {
            border-collapse: collapse;
            width: 99%;
            margin-left: 5px;
        }

        table,
        th,
        td {
            border: 1px solid #ccc;
        }

        th {
            background-color: #8b9cf8;
        }

        td {
            text-align: center;
        }

        th,
        td {
            padding: 10px;
        }

        td[class="operation"] {
            display: flex;
            flex-direction: column;
        }

        td[class="operation"] a {
            font-size: 14px;
        }
    </style>
</head>
<body>
<div class="right">
    <div class="top"></div>
    <div class="table">
        <table>
            <thead>
            <tr>
                <th>编号</th>
                <th>订单编号</th>
                <th>客户姓名</th>
                <th>是否出货</th>
                <th>订货时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr v-for="(item,index) in orderInfo" :key="item.id">
                <td>{{index+1}}</td>
                <td>{{item.order_id}}</td>
                <td>{{item.real_name}}</td>
                <td>{{item.isDelivery}}</td>
                <td>{{item.create_time}}</td>
                <td class="operation"><a href="">详细信息</a></td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
<script src="static/js/vue-2.6.10.js"></script>
<script src="static/js/axios.min.js"></script>
<script>
    new Vue({
        el:'.right',
        data(){
            return{
                orderInfo:[
                    {
                        id:+new Date(),
                        order_id:'2141241255151241',
                        real_name:'gjy',
                        isDelivery:'是',
                        create_time:'2021-08-12 12:12:12',
                    },
                    {
                        id:+new Date(),
                        order_id:'2141241255151241',
                        real_name:'gjy',
                        isDelivery:'是',
                        create_time:'2021-08-12 12:12:12',
                    },
                    {
                        id:+new Date(),
                        order_id:'2141241255151241',
                        real_name:'gjy',
                        isDelivery:'是',
                        create_time:'2021-08-12 12:12:12',
                    },
                    {
                        id:+new Date(),
                        order_id:'2141241255151241',
                        real_name:'gjy',
                        isDelivery:'是',
                        create_time:'2021-08-12 12:12:12',
                    },
                ]
            }
        },
        created(){
            axios({
                url:'getOrderInfo.do',
            }).then(re=>{
                re.data.forEach(item=>{
                    item.isDelivery='是'
                })
                console.log(re)
                this.orderInfo=re.data
            })
        }
    })
</script>
</body>
</html>
